'use strict';
var single_element = function(collection){
    let arr1=[];
    let arr2=[];
    let result=[];
    for(let i=0;i<collection.length;i++){
        if((i+1)%2==0){
            arr1.push(collection[i]);
        }
    }
    for(let i=0;i<arr1.length;i++){
        if(arr1[i]==arr1[i+1]){
            arr2.push(arr1[i]);
        }
    }
    for(let i=0;i<arr1.length;i++){
        if(arr2.indexOf(arr1[i])==-1){
            result.push(arr1[i]);
        }
    }
    return result;
}
var collection_a = [1, 2, 3, 2, 5, 6, 21, 43, 12, 5];
console.log(single_element(collection_a))
module.exports = single_element;
